import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UsersController } from './modules/users/users.controller';
import { UsersService } from './modules/users/users.service';
import { GoodsModule } from './modules/goods/goods.module';
import { MoviesModule } from './modules/movies/movies.module';
import { FoodsModule } from './modules/foods/foods.module';
import { UsersModule } from './modules/users/users.module';
@Module({
  imports: [
    TypeOrmModule.forRoot({
      type:'mysql',
      host:'localhost',
      port:3306,
      username:'root',
      password:'zentdb',
      entities: [__dirname + '/**/*.entity{.ts,.js}'],
      database:'nest_test'
    }),GoodsModule, MoviesModule, FoodsModule, UsersModule],
  controllers: [AppController, UsersController],
  providers: [AppService, UsersService],
})
export class AppModule {}
